home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / DIKUMUD.ZIP / DB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-30  |  3.9 KB  |  132 lines

  1.  
  2. /* data files used by the game system */
  3.  
  4. #define DFLT_DIR          "lib"           /* default data directory     */
  5.  
  6. #define WORLD_FILE        "tinyworld.wld" /* room definitions           */
  7. #define MOB_FILE          "tinyworld.mob" /* monster prototypes         */
  8. #define OBJ_FILE          "tinyworld.obj" /* object prototypes          */
  9. #define ZONE_FILE         "tinyworld.zon" /* zone defs & command tables */
  10. #define CREDITS_FILE      "credits"       /* for the 'credits' command  */
  11. #define NEWS_FILE         "news"          /* for the 'news' command     */
  12. #define MOTD_FILE         "motd"          /* messages of today          */
  13. #define PLAYER_FILE       "players"       /* the player database        */
  14. #define TIME_FILE         "time"          /* game calendar information  */
  15. #define IDEA_FILE         "ideas"         /* for the 'idea'-command     */
  16. #define TYPO_FILE         "typos"         /*         'typo'             */
  17. #define BUG_FILE          "bugs"          /*         'bug'              */
  18. #define MESS_FILE         "messages"      /* damage message             */
  19. #define SOCMESS_FILE      "actions"       /* messgs for social acts     */
  20. #define HELP_KWRD_FILE    "help_table"    /* for HELP <keywrd>          */
  21. #define HELP_PAGE_FILE    "help"          /* for HELP <CR>              */
  22. #define INFO_FILE         "info"          /* for INFO                   */
  23. #define WIZLIST_FILE      "wizlist"       /* for WIZLIST                */
  24. #define POSEMESS_FILE     "poses"         /* for 'pose'-command         */
  25.  
  26. #define REAL 0
  27. #define VIRTUAL 1
  28.  
  29.  
  30. /* structure for the reset commands */
  31. struct reset_com
  32. {
  33.     char command;   /* current command                      */ 
  34.     bool if_flag;   /* if TRUE: exe only if preceding exe'd */
  35.     int arg1;       /*                                      */
  36.     int arg2;       /* Arguments to the command             */
  37.     int arg3;       /*                                      */
  38.  
  39.     /* 
  40.     *  Commands:              *
  41.     *  'M': Read a mobile     *
  42.     *  'O': Read an object    *
  43.     *  'G': Give obj to mob   *
  44.     *  'P': Put obj in obj    *
  45.     *  'G': Obj to char       *
  46.     *  'E': Obj to char equip *
  47.     *  'D': Set state of door *
  48.     */
  49. };
  50.  
  51.  
  52.  
  53. /* zone definition structure. for the 'zone-table'   */
  54. struct zone_data
  55. {
  56.   char *name;             /* name of this zone                  */
  57.   int lifespan;           /* how long between resets (minutes)  */
  58.   int age;                /* current age of this zone (minutes) */
  59.   int top;                /* upper limit for rooms in this zone */
  60.   short start;            /* has this zone been reset yet?      */
  61.   
  62.   int reset_mode;         /* conditions for reset (see below)   */
  63.   struct reset_com *cmd;  /* command table for reset               */
  64.   char races[50];  /* races that are tolerated here */
  65.   float CurrTotGold, LastTotGold;
  66.   float CurrToPCGold, LastToPCGold;
  67.  
  68.   /*
  69.    *  Reset mode:                              *
  70.    *  0: Don't reset, and don't update age.    *
  71.    *  1: Reset if no PC's are located in zone. *
  72.    *  2: Just reset.                           *
  73.    */
  74. };
  75.  
  76.  
  77.  
  78.  
  79. /* element in monster and object index-tables   */
  80. struct index_data
  81. {
  82.     int virtual;    /* virtual number of this mob/obj           */
  83.     long pos;       /* file position of this field              */
  84.     int number;     /* number of existing units of this mob/obj    */
  85.     int (*func)();  /* special procedure for this mob/obj       */
  86.     char *name;
  87.         char *short_desc;
  88.         char *long_desc;
  89. };
  90.  
  91.  
  92.  
  93.  
  94. /* for queueing zones for update   */
  95. struct reset_q_element
  96. {
  97.     int zone_to_reset;            /* ref to zone_data */
  98.     struct reset_q_element *next;    
  99. };
  100.  
  101.  
  102.  
  103. /* structure for the update queue     */
  104. struct reset_q_type
  105. {
  106.     struct reset_q_element *head;
  107.     struct reset_q_element *tail;
  108. } reset_q;
  109.  
  110.  
  111.  
  112. struct player_index_element
  113. {
  114.     char *name;
  115.     int nr;
  116. };
  117.  
  118.  
  119. struct help_index_element
  120. {
  121.     char *keyword;
  122.     long pos;
  123. };
  124.  
  125.  
  126. #define ZONE_NEVER  0
  127. #define ZONE_EMPTY  1
  128. #define ZONE_ALWAYS 2
  129. #define ZONE_ASTRAL 4
  130. #define ZONE_DESERT 8
  131. #define ZONE_ARCTIC 16
  132.